<template>
  <div>
    <bk-table
      :data="bbsList">
      <bk-table-column type="selection" width="60"></bk-table-column>
      <bk-table-column type="index" label="序列" width="60"></bk-table-column>
      <bk-table-column label="名称" prop="ip">
        <template slot-scope="props">
          <bk-button class="mr10" theme="primary" text @click="handleClick(props.row)">{{props.row.title}}</bk-button>
        </template>
      </bk-table-column>
      <bk-table-column label="创建时间" prop="createTime"></bk-table-column>
    </bk-table>
  </div>
</template>

<script>
import { mapActions, mapState } from 'vuex';
export default {
  components: {},
  props: {},
  data() {
    return {
      data: [],
    };
  },
  computed: {
    ...mapState('bbs', ['bbsList']),
  },
  watch: {},
  created() {},
  mounted() {
    this.getBbsList();
  },
  methods: {
    ...mapActions('bbs', ['getBbsList']),
    handleClick(row) {
      this.$router.push({ name: 'detail', params: { id: row.id } });
    },
  },
};
</script>
<style>

</style>
